home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Photopaedia 3: Still Lifes - Diane Wesson
/
Still Lifes - Diane Wesson.iso
/
pc
/
msstp
/
setup.mst
< prev
next >
Wrap
Text File
|
1994-10-09
|
4KB
|
158 lines
'**************************************************************************
'* MSSetup Toolkit Photopaedia
'**************************************************************************
'$DEFINE DEBUG ''Define for script development/debugging
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
''Dialog ID's
CONST WELCOME = 100
CONST ASKQUITE = 200
CONST ASKQUITJ = 250
CONST DESTPATHJ = 300
CONST DESTPATHE = 350
CONST EXITFAILURE = 400
CONST EXITQUIT = 600
CONST EXITSUCCESS = 700
CONST OPTIONS = 800
CONST APPHELP = 900
CONST CHECK = 2500
CONST CHECKJ = 2550
CONST BADPATH = 6400
CONST ENDING = 8000
CONST ENDINGJ = 8050
''Bitmap ID
CONST LOGO = 1
GLOBAL DEST$ ''Default destination directory.
GLOBAL OPTCUR$ ''Option selection from option dialog.
DECLARE SUB Install
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
INIT:
CUIDLL$ = "mscuistf.dll" ''Custom user interface dll
HELPPROC$ = "FHelpDlgProc" ''Help dialog procedure
lng$ = GetIniKeyString("win.ini", "intl", "sLanguage")
IF lng$ = "jpn" THEN
title$ = "Photopaedia âZâbâgâAâbâv"
dlg% = DESTPATHJ
dlge% = ASKQUITJ
ELSE
title$ = "Photopaedia Setup"
dlg% = DESTPATHE
dlge% = ASKQUITE
END IF
SetBitmap CUIDLL$, LOGO
SetTitle title$
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szInf$ = GetSymbolValue("STF_CWDDIR") + "SETUP.INF"
END IF
ReadInfFile szInf$
szWinDir$ = GetWindowsDir()
szRoot$ = GetSymbolValue("STF_SRCDIR")
GETPATH:
SetSymbolValue "EditTextIn", "C:\"
SetSymbolValue "EditFocus", "END"
GETPATHL1:
sz$ = UIStartDlg(CUIDLL$, dlg%, "FEditDlgProc", APPHELP, HELPPROC$)
DEST$ = GetSymbolValue("EditTextOut")
IF NOT sz$ = "CONTINUE" THEN
GOTO QUIT
END IF
IF IsDirWritable(DEST$) = 0 THEN
GOSUB BADPATH
GOTO GETPATHL1
END IF
UIPop 1
SrcDir$ = GetSymbolValue("STF_SRCDIR")
AddSectionFilesToCopyList "Files", SrcDir$, DEST$
CopyFilesInCopyList
CreateProgmanGroup "Photopaedia", "PHOTOPAE", cmoNone
ShowProgmanGroup "Photopaedia", 1, cmoNone
CreateProgmanItem "Photopaedia", "Still Lifes", MakePath(DEST$,"still\still.exe"), MakePath(DEST$,"still\dw.ico")+",ICON_1,100,100,"+szRoot$+"DATA", cmoOverwrite
CreateProgmanItem "Photopaedia", "SL-Slideshow", MakePath(DEST$,"still\slauto.exe"), MakePath(DEST$,"still\auto.ico")+",ICON_1,300,100,"+szRoot$+"DATA", cmoOverwrite
IF lng$ = "jpn" THEN
CreateProgmanItem "Photopaedia", "SL-Readme", MakePath(DEST$,"still\readmej.wri"), MakePath(DEST$,"still\read.ico")+",ICON_1,500,100,"+DEST$+"still", cmoOverwrite
ELSE
CreateProgmanItem "Photopaedia", "SL-Readme", MakePath(DEST$,"still\readmee.wri"), MakePath(DEST$,"still\read.ico")+",ICON_1,500,100,"+DEST$+"still", cmoOverwrite
END IF
'' sz$ = UIStartDlg(CUIDLL$, dlge%, "FInfo0DlgProc", APPHELP, HELPPROC$)
QUIT:
END
'**
'** Purpose:
'** Appends a file name to the end of a directory path,
'** inserting a backslash character as needed.
'** Arguments:
'** szDir$ - full directory path (with optional ending "\")
'** szFile$ - filename to append to directory
'** Returns:
'** Resulting fully qualified path name.
'*************************************************************************
FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
IF szDir$ = "" THEN
MakePath = szFile$
ELSEIF szFile$ = "" THEN
MakePath = szDir$
ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
MakePath = szDir$ + szFile$
ELSE
MakePath = szDir$ + "\" + szFile$
END IF
END FUNCTION
BADPATH:
sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO BADPATH
END IF
UIPop 1
RETURN
ASKQUIT:
sz$ = UIStartDlg(CUIDLL$, dlge%, "FQuitDlgProc", 0, "")
IF sz$ = "EXIT" THEN
UIPopAll
ERROR STFQUIT
ELSEIF sz$ = "REACTIVATE" THEN
GOTO ASKQUIT
ELSE
UIPop 1
END IF
RETURN